<template>

  <!--  今日数据详情-->
  <div class="container" style="width:550px;height: 400px;float: left">
    <div ref="main" style="width:550px;height: 400px;margin-top: 40px"></div>
  </div>
</template>

<script>
export default {
  props:{
    data: {},
  },
  created() {

  },
  mounted() {
    this.initChart()
  },
  methods:{
    initChart() {

      const chartDom = this.$echarts.init(this.$refs.main)
      const option = {
        xAxis: {
          type: 'category',
          data: ['三天前', '昨天', '今天提交']
        },
        yAxis: {
          type: 'value'
        },
        series: [
          {
            data: this.data,
            type: 'line'
          }
        ]
      };

      option && chartDom.setOption(option);

    }
  }

}
</script>

<style scoped>

</style>